package hist.mobilprogramming.tictactoeapplication;


/**
 * @author godtltro
 *	Square element that hold a position and can return its respective row and column id
 */
public class SquareElement
{

	private int _row;
	private int _col;

	public SquareElement(int rowId, int colId)
	{
		_row = rowId;
		_col = colId;
	}

	public boolean equals(Object obj) 
	{ 
		if (obj instanceof SquareElement)
		{
			SquareElement element = (SquareElement) obj;
			if (this._row == element._row && this._col == element._col)
				return true;
		}
		
		return false;
	}
	
	
	/**
	 * @return Current row id
	 */
	public int getRow()
	{
		return _row;
	}
	
	/**
	 * @return Current column id
	 */
	public int getColumn()
	{
		return _col;
	}
}

